package com.xiaoshuidi.cloud.module.rooms.api;

import com.xiaoshuidi.cloud.framework.common.pojo.CommonResult;
import com.xiaoshuidi.cloud.module.rooms.service.RoomEquipmentService;
import com.xiaoshuidi.cloud.module.rooms.vo.RoomEquipmentVO;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.xiaoshuidi.cloud.module.system.enums.ApiConstants.VERSION;

@RestController
@DubboService(version = VERSION)
@Validated
@RequiredArgsConstructor
public class RoomEquipmentApiImpl implements RoomEquipmentApi {
    private final RoomEquipmentService roomEquipmentService;

    @Override
    public CommonResult<List<RoomEquipmentVO>> getRoomEquipmentByRoomId(Long roomId) {
        return roomEquipmentService.getRoomEquipmentByRoomId(roomId);
    }
}
